<?php
/**
 * User: @lose
 * Date: 2020/10/20
 * Time: 10:47 上午
 */

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/activity',
    'namespace' => 'Frieza\\Modules\\Activity\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    $router->get('/Spotlight/list', 'SpotlightController@main');
    $router->get('/Spotlight/list/{id}/edit', 'SpotlightController@create');
    $router->get('/Spotlight/list/create', 'SpotlightController@create');
    $router->post('/Spotlight/list/save', 'SpotlightController@save');
    $router->delete('/Spotlight/list/{id}', 'SpotlightController@delete');
    $router->post('/Spotlight/clear/{id}/{action}', 'SpotlightController@clearCache');

    $router->get('/SpringHome/list', 'SpringHomeController@list');
    $router->get('/SpringHome/goods', 'SpringHomeController@list');
    $router->any('/SpringHome/cache', 'SpringHomeController@list');
    $router->any('/SpringHome/pool', 'SpringHomeController@list');

    $router->get('/weeklyList', 'WeeklyListController@guide');
    $router->get('/weeklyList/{feature_id}', 'WeeklyListController@index');
    $router->post('/weeklyList/{feature_id}', 'WeeklyListController@add');
    $router->put('/weeklyList/{feature_id}/{uid}', 'WeeklyListController@check');
    $router->get('/weeklyListExport', 'WeeklyListController@export');
    
    #活动页
    $router->get('/page', 'PageController@pageList');
    $router->get('/page/getObjTitle', 'PageController@getObjTitle');
    $router->get('/page/{moduleId}/copy', 'PageController@moduleCopy');
    $router->post('/page/copySave', 'PageController@moduleCopySave');
    $router->get('/page/add', 'PageController@pageEdit');
    $router->get('/page/{pageId}/edit', 'PageController@pageEdit');
    $router->post('/page/save/{pageId?}', 'PageController@savePage');
    $router->delete('/page/{pageId}', 'PageController@delPage');
    $router->put('/page/{pageId}', 'PageController@savePageStatus');
    $router->get('/page/{pageId}/edit/add/{type}', 'PageController@moduleAdd');  #活动页添加模块
    $router->post('/page/{pageId}/edit/addAnchorModule', 'PageController@addAnchorModule');
    $router->post('/page/{pageId}/edit/addTabModule', 'PageController@addTabModule');
    $router->get('/page/{pageId}/edit/{moduleId}/edit', 'PageController@moduleEdit');  #活动页修改模块
    $router->get('/page/{pageId}/edit/{moduleId}/edit/create', 'PageController@moduleItemAdd');  #活动页添加模块子项
    $router->get('/page/{pageId}/edit/{moduleId}/edit/{itemId}/edit', 'PageController@moduleItemAdd'); #活动页删除模块子项
    $router->post('/page/{pageId}/save/{moduleId?}', 'PageController@saveModule');
    $router->put('/page/{pageId}/edit/{moduleId}', 'PageController@saveModuleData');
    $router->post('/page/{pageId}/sort', 'PageController@sortModule');
    $router->delete('/page/{pageId}/edit/{moduleId}', 'PageController@delModule');
    $router->post('/page/{pageId}/module/{moduleId}/addGoods', 'PageController@addModuleGoods');
    $router->post('/page/{pageId}/module/{moduleId}/addSpecialGoods', 'PageController@addSpecialGoods');
    $router->post('/page/{pageId}/module/{moduleId}/addImgs', 'PageController@addModuleImgs');
    $router->post('/page/{pageId}/module/{moduleId}/addWiki', 'PageController@addModuleWiki');
    $router->post('/page/{pageId}/module/{moduleId}/addCard', 'PageController@addModuleCard');
    $router->post('/page/{pageId}/module/{moduleId}/addSpecialArticle', 'PageController@addSpecialArticle'); #增加榜单h5整屋卡片
    $router->post('/page/{pageId}/module/{moduleId}/addMultiCard', 'PageController@addModuleMultiCard'); #保存批量卡片模块子项
    $router->post('/page/{pageId}/module/{moduleId}/addSpecialGoods', 'PageController@addModuleSpecialGoods'); #保存住友津贴商品信息
    $router->delete('/page/{pageId}/edit/{moduleId}/edit/{itemId}', 'PageController@delModuleItem'); #活动页删除模块子项
    $router->put('/page/{pageId}/edit/{moduleId}/edit/{itemId}', 'PageController@saveModuleItem');
    $router->post('/page/{pageId}/edit/{moduleId}/sort', 'PageController@sortModuleItems');
    $router->post('/page/{pageId}/{topicId}/reload', 'PageController@reloadTopic');
    $router->get('/cards/index', 'CardsController@index');
    $router->post('/cards/save', 'CardsController@save');

    $router->get('/demand/feedback', 'DemandFeedbackController@index');
    $router->get('/demandFeedback/export', 'DemandFeedbackController@export');

    $router->get('/demand/report', 'DemandReportExportController@index');
    $router->get('/demandReport/{type}/export', 'DemandReportExportController@export');
});